package com.wanda.exception;

import com.wanda.common.ResponseEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author sky
 * @date 2022-08-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Appexception extends RuntimeException {
    private String code;
    private String message;

    public Appexception(ResponseEnum responseEnum) {
        this.code = responseEnum.getCode();
        this.message = responseEnum.getMessage();
    }
}
